package com.erlang4j.api.exceptions;

import com.erlang4j.internal.exceptions.Erlang4jException;
import com.erlang4j.internal.exceptions.Erlang4jExceptionConstants;
import com.erlang4j.internal.messages.MessageToken;

/**
 * <p>
 * this occurs when you give a pattern that parser doesn't know how to deal with. I am not sure that this can actually
 * be thrown!
 * </p>
 * 
 * @author Phil Rice
 */
public class Erlang4jUnexpectedTokenException extends Erlang4jException {

	public Erlang4jUnexpectedTokenException(MessageToken token) {
		super(Erlang4jExceptionConstants.unexpectedTokenKey, token.type, token.value, token.pos, token.raw);
	}

}
